#region Copyright
/// <copyright>
/// Copyright (c) 2007 Ilia Shramko.
/// Released under the terms of the GNU General Public License.
/// </copyright>
#endregion

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;

namespace Osh
{
	public class Formatter
	{
		public string FormatDateTime(DateTime dateTime, string format, string cultureName)
		{
			if(string.IsNullOrEmpty(cultureName))
				return dateTime.ToString(format);
			else
				return dateTime.ToString(format, CultureInfo.GetCultureInfo(cultureName));
		}
	}
}
